package answer2;

import java.io.IOException;
import java.util.Map;

public class HttpContext {
    private HttpStrategy httpStrategy;

    public HttpContext(HttpStrategy httpStrategy) {
        this.httpStrategy = httpStrategy;
    }

    public void get(String url) throws IOException {
        this.httpStrategy.doGet(url);
    }

    public void post(String url, Map params) throws IOException {
        this.httpStrategy.doPost(url, params);
    }
}
